package com.ac.app.web.action.pick;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ac.app.dm.PickRecord;
import com.caac.core.web.action.BaseAction;
import com.caac.core.web.form.BaseForm;

import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright AgileCentury 2008</p>
 * <p>Company: AgileCentury </p>
 * @author <a href="mailto:ac@agilecentury.com">Agile</a>
 * @version 1.0
 */

public class BrowsePkRecordAction extends BaseAction {
    protected ActionForward doExecute(ActionMapping mapping,
                                      BaseForm form,
                                      HttpServletRequest request,
                                      HttpServletResponse response)
            throws Exception {
        String id = request.getParameter("id");
        PickRecord pickRecord = (PickRecord) this.getBaseManager()
                .getObjectById(PickRecord.class, id);
        pickRecord.setClkCount(pickRecord.getClkCount()+1);
        this.getBaseManager().saveObject(pickRecord);
        request.setAttribute("pickRecord", pickRecord);
        String lb = "01";
        return forward(mapping,"success"+lb);
    }
}
